package com.elot.core.utils;

import java.util.ArrayList;
import java.util.List;

import com.elot.core.types.KeyValue;

public class Converter {
	
	public static List<KeyValue<String>> getKeyValuesByEnum(Enum<?>[] enums) {
		List<KeyValue<String>> result = new ArrayList<KeyValue<String>>();
		if (enums!=null && enums.length>0) {
			for (Enum<?> e : enums) {
				result.add(new KeyValue<String>(e.name(), e.name()));
			}
		}
		return result;
	}
	
}
